package com.aaa.cs.controller;

import com.aaa.common.util.Result;
import com.aaa.cs.entity.DictData;
import com.aaa.cs.service.DictDataService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 字典数据表(DictData)表控制层
 *
 * @author makejava
 * @since 2020-11-19 16:29:13
 */
@RestController
@RequestMapping("dictData")
public class DictDataController {
    /**
     * 服务对象
     */
    @Resource
    private DictDataService dictDataService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public DictData selectOne(Integer id) {
        return this.dictDataService.queryById(id);
    }

    @GetMapping("queryAll")
    public Result queryAll(DictData dictData){
        return this.dictDataService.queryAll(dictData);
    }
}